#ifndef __XSERVER_TASK_H__
#define __XSERVER_TASK_H__

#include "xtask.h"
#include "xcom.h"

typedef void(*ListenCBFunc)(int client_sock, struct sockaddr* addr, int socklen, void* arg);

class XCOM_API XServerTask : public XTask
{
public:
	virtual bool Init() override;

	ListenCBFunc ListenCB = 0;

	void set_server_port(int server_port) { server_port_ = server_port; }
private:
	int server_port_ = 0;
};

#endif
